package com.controller;
 

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.contants.ResultContants;
import com.entity.SysUser;
import com.service.UserService;
import com.utils.JsonResult;

 
@RestController
@RequestMapping("/user")    
public class UserController {
 
    @Autowired
    private UserService userService;
    
    @PostMapping("/queryAllUser")
    public JsonResult queryDocUser(@RequestBody SysUser user){
        try {
           return userService.selectUserList(user);
        } catch (Exception e) {
            e.printStackTrace();
            return new JsonResult(ResultContants.failCode,e.getMessage(),"");
        }
    }
}